import re

template = re.compile(r"(-?\d+)(\.\d+)?")
#template = re.compile(r"[A-Z]+\d+")
#tar_str = "sldkjaslfkAAAAABBB0001D"

tar_str = 'score: -12.11'
match = template.search(tar_str)
print(match)
if match:
    print(match.group())
    print(match.group(1))
    print(match.group(2))